﻿@model IList<ProductOverviewModel>

@using Nop.Web.Models.Catalog;
@if (Model.Count > 0)
{
   

















            <div class="product-grid home-page-product-grid">
                <div class="title mid-content-title">
									<strong>@T("Products.AlsoPurchased")</strong>
@if (Model.Count > 3)
{
	<span class="pull-right">
		<a class="title-carousel-control" href="#carousel-example-generic-purchased-product" data-slide="prev">
			<i class="fa fa-angle-left"></i>
		</a>
		<a class="title-carousel-control" href="#carousel-example-generic-purchased-product" data-slide="next">
			<i class="fa fa-angle-right"></i>
		</a>

	</span>
}
                </div>
        
                
        

                <div id="carousel-example-generic-purchased-product" class="carousel slide" data-ride="carousel">
                    <!-- Indicators -->
    

                    <!-- Wrapper for slides -->
                    <div class="carousel-inner">
                        @{
                            var pg_i = 0;
                        } 
                        @foreach (var item in Model)
                        {
                            if(pg_i==0)
                            {
                                @:<div class="item active">
                                @:<div class="row box-products" >
                            }else if(pg_i%3==0){
                                @:<div class="item">
                                @:<div class="row box-products" >
                            }
                    
                            <div class="col-md-4">
                                <div class="offer offer-default silde-show-offer pull-text-center">
                                    @Html.Partial("_ProductBox", item)
                                </div>
                            </div>
                    

                            if(pg_i%3==2){
                                @:</div>
                                @:</div>
                            }
                            pg_i++;
                        }
                        @if(pg_i%3!=0){
                            @:</div>
                            @:</div>
                        }
        
                    </div>


                </div>
            </div>



}